import request from '@/utils/request'

const subscribeApi = {
    /**
     * 订阅记录
     */
    lists(params: {
        page_no?: number;
        page_size?: number;
        user?: string;
        order_sn?: string;
        pay_way?: number;
        pay_status?: number;
        start_time?: string;
        end_time?: string;
    }): Promise<any> {
        return request.get({
            url: '/finance/subscribe/lists',
            params
        })
    },

    /**
     * 订阅退款
     */
    refund(order_id: number): Promise<any> {
        return request.post({
            url: '/finance/subscribe/refund',
            params: {
                id: order_id
            }
        })
    }
}

export default subscribeApi
